package com.tang.mybatis.session.defaults;

import com.tang.mybatis.session.Configuration;
import com.tang.mybatis.session.SqlSession;

import java.util.List;

/**
 * @author Tang
 * @classname DefaultSqlSession
 * @description [  ]
 * @date 2022/4/6 15:58
 */
public class DefaultSqlSession implements SqlSession {

    private Configuration configuration;

    public DefaultSqlSession(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public <E> List<E> selectList(String statementId, Object[] args) {
        return null;
    }

    @Override
    public <T> T selectOne(String statementId, Object[] args) {
        return null;
    }

    @Override
    public <T> T getMapper(Class<T> tClass) {
        return this.getConfiguration().getMapper(tClass,this);
    }

    @Override
    public Configuration getConfiguration() {
        return configuration;
    }
}